﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
    namespace="NGinnBPM.Dao" assembly="NGinnBPM.Dao">

  <class name="TaskInstanceData" table="TaskInstanceData"
         dynamic-update="true"                   
        dynamic-insert="true" >

    <id name="InstanceId" type="String">
      <column name="instance_id" sql-type="varchar(32)" not-null="true"/>
      <generator class="assigned" />
    </id>
    
    <property name="ProcessDefinitionId" type="String">
      <column name="definition_id" sql-type="varchar(40)" not-null="true" />
    </property>
    
    <property name="TaskId" type="String">
      <column name="task_id" sql-type="varchar(40)" not-null="true" />
    </property>
    
    <property name="ProcessInstanceId" type="String">
      <column name="process_id" sql-type="varchar(40)" not-null="false" />
    </property>
    
    <property name="ParentTaskInstanceId" type="String">
      <column name="parent_task_id" sql-type="varchar(40)" not-null="false" />
    </property>

    <property name="RecordVersion" type="int">
      <column name="version" sql-type="int" not-null="true" />
    </property>
    
    <many-to-one name="Status" class="TaskInstanceStatus" column="status" ></many-to-one>
    
    <property name="StartDate" type="DateTime">
      <column name="start_date" sql-type="datetime" not-null="true" />
    </property>
    
    <property name="FinishDate" type="DateTime">
      <column name="finish_date" sql-type="datetime" not-null="false" />
    </property>
    
    <property name="LastModified" type="DateTime">
      <column name="last_modified" sql-type="datetime" not-null="true" />
    </property>

    <property name="TaskData" type="StringClob">
      <column name="task_data" sql-type="ntext" not-null="false" />
    </property>

    <property name="SchedulingStatus" type="Int32">
      <column name="scheduling_status" sql-type="int" not-null="true" />
    </property>

    <property name="TaskType" type="String">
      <column name="task_type" sql-type="varchar(50)" not-null="false" />
    </property>
  </class>

</hibernate-mapping>